﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace prime_factor
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int target = int.Parse(s);
            int i = target - 1;
            List<int> number = new List<int>();
            for (int j = 2; j <= target; j++)
            {
                number.Add(j);
            }
            for (int k = 0; k < i; k++)
            {
                int now = k;
                if (number[k] == 0)
                    continue;
                for (int l = k + 1; l < i; l++)
                {
                    if (number[l] % number[now] == 0)
                    {
                        number[l] = 0;
                    }
                }
            }
            for (int a = 0; a < number.Count; a++)
            {
                if (number[a] != 0 && target % number[a] == 0)
                    Console.WriteLine(number[a]);
            }
        }
    }
}
